package com.tanjie.blackbean.system.admin.model.user;

import com.baomidou.mybatisplus.annotation.*;
import com.tanjie.blackbean.pojo.system.UserType;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

import java.io.Serializable;
import java.util.Date;

/**
 * 用户表
 *
 * @author tanjie
 * @since 2022-04-20
 */
@Getter
@Setter
@ToString
@TableName("sys_user")
@Schema(name = "UserPO", description = "用户表")
public class UserPO implements Serializable {

    private static final long serialVersionUID = 1L;

    @Schema(description = "主键")
    @TableId(value = "id", type = IdType.ASSIGN_UUID)
    private String id;

    @Schema(description = "登录用户名")
    @TableField("username")
    private String username;

    @Schema(description = "登录密码（加密）")
    @TableField("`password`")
    private String password;

    @Schema(description = "组织id")
    @TableField("org_id")
    private String orgId;

    @Schema(description = "用户类型：1：sys（后台系统）")
    @TableField("user_type")
    private UserType userType;

    @Schema(description = "昵称")
    @TableField("nickname")
    private String nickname;

    @Schema(description = "真实姓名")
    @TableField("real_name")
    private String realName;

    @Schema(description = "电话")
    @TableField("phone")
    private String phone;

    @Schema(description = "邮箱")
    @TableField("email")
    private String email;

    @Schema(description = "地址")
    @TableField("address")
    private String address;

    @Schema(description = "状态: 1-正常")
    @TableField("`status`")
    private Integer status;

    @Schema(description = "创建人")
    @TableField(value = "create_by", fill = FieldFill.INSERT)
    private String createBy;

    @Schema(description = "创建时间")
    @TableField(value = "create_time", fill = FieldFill.INSERT)
    private Date createTime;

    @Schema(description = "修改人")
    @TableField(value = "update_by", fill = FieldFill.INSERT_UPDATE)
    private String updateBy;

    @Schema(description = "修改时间")
    @TableField(value = "update_time", fill = FieldFill.INSERT_UPDATE)
    private Date updateTime;

}
